package com.jams.goodox.activity.qa;

import android.content.Context;
import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import com.jams.goodox.utils.DensityUtil;

/**
 * Created by HP on 2018/5/12.
 */

public class MyItemDecoration extends RecyclerView.ItemDecoration {
    private int height;

    public  MyItemDecoration(int height){
        this.height = height;
    }


    /**
     *
     * @param outRect 边界
     * @param view recyclerView ItemView
     * @param parent recyclerView
     * @param state recycler 内部数据管理
     */
    @Override
    public void getItemOffsets(Rect outRect, View view,
                               RecyclerView parent, RecyclerView.State state) {
        //设定底部边距为1px
        outRect.set(0, 0, 0, height);
    }
}